﻿<Window x:Class="wpfInércia.MainWindowInercia"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded">
    <Window.Triggers>
        <EventTrigger RoutedEvent="Window.Loaded">
            <BeginStoryboard>
                <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="label1" Storyboard.TargetProperty="Height" From="0" To="1000" Duration="00:00:10"  />
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </Window.Triggers>
    <Canvas Name="canvas1" MouseDown="Canvas_MouseDown" MouseLeftButtonDown="canvas1_MouseLeftButtonDown" PreviewMouseLeftButtonDown="canvas1_PreviewMouseLeftButtonDown">
        <Image Name="image1"   Height="60" Width="60" Canvas.Left="8" Canvas.Top="7" >            
            <Image.Clip>
                <EllipseGeometry  RadiusX="20" RadiusY="20" Center="30,30" />
            </Image.Clip>
            <Image.RenderTransform> 
                <TransformGroup>
                    <RotateTransform x:Name="zeca" Angle="0" CenterX="34" CenterY="32" />
                    <TranslateTransform x:Name="Trans" X="0" Y="0" />
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
        <Button Canvas.Left="428" Canvas.Top="13" Content="Button" Height="23" Name="button1" Width="75" >
            <Button.Triggers>
                <EventTrigger RoutedEvent="Button.Click">
                    <BeginStoryboard >
                        <Storyboard FillBehavior="Stop">
                                
                            
                             
                            <DoubleAnimation Storyboard.TargetName="zeca"
                                             Storyboard.TargetProperty="Angle"
                                             From="0" To="3600" Duration="0:0:05" RepeatBehavior="Forever"
                                    />

                            <DoubleAnimation Storyboard.TargetName="image1"
                                             Storyboard.TargetProperty="(Canvas.Left)"
                                             From="0" To="360" Duration="0:0:05"
                                    />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Button.Triggers>
        </Button>
        <Label Canvas.Left="109" Canvas.Top="50" Content="Label" Height="41" Name="label1" Width="258" FontSize="18" />
        <Button Canvas.Left="431" Canvas.Top="51" Content="Button" Height="21" Name="button2" Width="66" Click="button2_Click" />
        <Button Canvas.Left="447" Canvas.Top="90" Content="Button" Height="33" Name="button3" Width="56" Click="button3_Click" />
        <Button Canvas.Left="445" Canvas.Top="147" Content="Button" Height="30" Name="button4" Width="53" Click="button4_Click" />
        <Ellipse Canvas.Left="226" Canvas.Top="101" Height="38" Name="ellipse1" Stroke="Black" Width="38" MouseLeftButtonDown="ellipse1_MouseLeftButtonDown">
            <Ellipse.OpacityMask>
                <ImageBrush ImageSource="/wpfHungryCitizen;component/Images/mig01.gif" />
            </Ellipse.OpacityMask>
            <Ellipse.Fill>
                <ImageBrush ImageSource="/wpfHungryCitizen;component/Images/mig01.gif" />
            </Ellipse.Fill>
        </Ellipse>
        <MediaElement Canvas.Left="200" Canvas.Top="200" Width="50" Height="50" Name="ahh" Source="C:\Windows\Media\Heritage\Windows Ding.wav" Volume=".5" LoadedBehavior="Manual"   UnloadedBehavior="Stop"    />
       
    </Canvas>
</Window>
